<?php
/** @var GrupoController $this */
/** @var Grupo $model */
/** @var AweActiveForm $form */
$form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array(
    'id' => 'grupo-form',
    'type' => 'horizontal',
    'enableAjaxValidation' => false,
    'clientOptions' => array('validateOnSubmit' => true, 'validateOnChange' => false),
    'enableClientValidation' => true,
        ));
?>

<p class="note"><?php echo Yii::t('AweCrud.app', 'Fields with') ?> <span class="required">*</span> <?php echo Yii::t('AweCrud.app', 'are required') ?>.</p>

<?php echo $form->textFieldRow($model, 'nombre', array('maxlength' => 64, 'class' => 'span4')) ?>
<?php echo $form->dropDownListRow($model, 'entidad_tipo', Crm_Constants::getGrupoTipoArray(), array('class' => 'fix span4')); ?>
<?php echo $form->textAreaRow($model, 'descripcion', array('rows' => 3, 'cols' => 50, 'class' => 'span4')) ?>

<div class="form-actions">
    <div class="form-actions-float">
        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
            'buttonType' => 'submit',
            'type' => 'success',
            'icon' => 'ok',
            'label' => $model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Save'),
        ));
        ?>
        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
            'icon' => 'remove',
            'label' => Yii::t('AweCrud.app', 'Cancel'),
            'htmlOptions' => array('onclick' => 'javascript:history.go(-1)')
        ));
        ?>
    </div>
</div>

<?php $this->endWidget(); ?>